<?php ob_start();
require('includes/connect.php');
    	$subcatid = $_POST["subcatid"];
    	$category = $_POST["category"];
		$subcat=$_POST["subcat"];

$sql="Update subcategories set `subcategory`='$subcat',`category_id`='$category' where subcategory_id=".$subcatid;
$result=mysql_query($sql);
		
		if($result)
						{
	
					header("location:subcategory.php");
		}
	else {
		//header("location:edituser.php");
		echo mysql_error();
	}
	
ob_flush();	?>
